* same relative position, taking packing into account */
elem = (position) ? position->prev : g_list_last (priv->children);
- while (elem && elem != tab && GTK_NOTEBOOK_PAGE (elem)->pack != GTK_NOTEBOOK_PAGE (tab)->pack)
- elem = elem->prev;
-
if (elem == tab)
return g_list_position (priv->children, tab);
(effective_direction == GTK_DIR_RIGHT) ? STEP_NEXT : STEP_PREV,
TRUE);
}
- while (child && GTK_NOTEBOOK_PAGE (last)->pack == GTK_NOTEBOOK_PAGE (child)->pack);
+ while (child);
child = last;
}
page = child->data;
- if (page->pack == priv->cur_page->pack)
- {
- if (effective_direction == GTK_DIR_RIGHT)
- page_num = reorder_tab (notebook, (page->pack == GTK_PACK_START) ? child->next : child, priv->focus_tab);
- else
- page_num = reorder_tab (notebook, (page->pack == GTK_PACK_START) ? child : child->next, priv->focus_tab);
-
- gtk_notebook_pages_allocate (notebook);
+ if (effective_direction == GTK_DIR_RIGHT)
+ page_num = reorder_tab (notebook, child->next, priv->focus_tab);
+ else
+ page_num = reorder_tab (notebook, child, priv->focus_tab);
- g_signal_emit (notebook,
- notebook_signals[PAGE_REORDERED],
- 0,
- ((GtkNotebookPage *) priv->focus_tab->data)->child,
- page_num);
+ gtk_notebook_pages_allocate (notebook);
- return TRUE;
- }
+ g_signal_emit (notebook,
+ notebook_signals[PAGE_REORDERED],
+ 0,
+ ((GtkNotebookPage *) priv->focus_tab->data)->child,
+ page_num);
- return FALSE;
+ return TRUE;
}
/**